package e2q.security.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * E2qSmDepartmentRoleType entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "e2q_sm_department_role_type")
public class E2qSmDepartmentRoleType extends e2q.web.orm.Persistent implements
		java.io.Serializable {

	// Fields

	private Long id;
	private E2qSmAccessResource e2qSmAccessResource;
	private E2qSmRole e2qSmRole;
	private Short drtDataType = 0;

	// Property accessors
	@Override
	public String toString() {
		return id.toString();
	}
	@Id
	@GeneratedValue(generator = "pk")
	@Column(name = "drtId")
	@GenericGenerator(name = "pk", strategy = "e2q.web.orm.IdGenerator")
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "drtAresId", nullable = false)
	public E2qSmAccessResource getE2qSmAccessResource() {
		return this.e2qSmAccessResource;
	}

	public void setE2qSmAccessResource(E2qSmAccessResource e2qSmAccessResource) {
		this.e2qSmAccessResource = e2qSmAccessResource;
	}

	@ManyToOne
	@JoinColumn(name = "drtRoleId", nullable = false)
	public E2qSmRole getE2qSmRole() {
		return this.e2qSmRole;
	}

	public void setE2qSmRole(E2qSmRole e2qSmRole) {
		this.e2qSmRole = e2qSmRole;
	}

	@Column(name = "drtDataType", nullable = false)
	public Short getDrtDataType() {
		return this.drtDataType;
	}

	public void setDrtDataType(Short drtDataType) {
		this.drtDataType = drtDataType;
	}

}